package com.lecing.dao;

import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 月付/年付 返款数据访问获取
 * Created by liucs on 2018/5/25.
 */
@Repository
public class RefundStatDao {
    private static final String namespace="com.lecing.dao.RefundStatDao.";
    @Resource
    private SqlSessionTemplate session;

    /**
     * 查询月付返款数据
     * @param month
     * @return
     */
    public List<Map<String,Object>> selectMpayReturn(@Param("month") String month){
        List<Map<String,Object>> mPayRefunds =new ArrayList<>();
        mPayRefunds = session.selectList(namespace+"selectMPayRefundsData",month);
        return mPayRefunds;
    }

    /**
     * 查询年付返款数据
     * @param month
     * @return
     */
    public List<Map<String,Object>> selectYPayReturn(@Param("month") String month){
        List<Map<String,Object>> yPayRefunds =new ArrayList<>();
        yPayRefunds = session.selectList(namespace+"selectYPayRefundsData",month);
        return yPayRefunds;
    }
}
